package com.imooc.o2o.service.impl;

import com.imooc.o2o.dao.AreaDao;
import com.imooc.o2o.entity.Area;
import com.imooc.o2o.service.AreaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;
@Service
public class AreaServiceImpl implements AreaService {
    @Autowired
    private AreaDao areaDao;
    public List<Area> getAreaList(){
        List<Area> arerList = new ArrayList<Area>();
        arerList = areaDao.queryArea();
        for(int i=0;i<arerList.size();i++){
            arerList.get(i).setAreaName(arerList.get(i).getAreaName()+"-B区");
            System.out.println(arerList.get(i).toString());
        }
        return arerList;
    }
}
